<template>
  <el-avatar class="avatar" v-if="Func.isEmpty(userStore.userInfo.avatarUrl)">
    {{ userStore.userInfo.username.charAt(0) }}
  </el-avatar>
  <el-avatar class="avatar" v-else :src="userStore.userInfo.avatarUrl"/>
</template>
<script setup>
import {useUserStore} from "@/store/index.js";
import Func from "@/utils/Utils.js";

const userStore = useUserStore();
</script>
<style scoped>
.avatar{
  cursor: pointer;
}

</style>